import { rcaNumberFormat0 } from './common.js'
import { dateFormat } from '@/util/date';
import { commonTableOption } from './common.js'
export const tableOption = {
  ...commonTableOption,
   height: '400px',
  column: [{
    type: 'date',
    label: '日期范围',
    searchSpan: 12,
    width: 180,
    searchRange: true,
    search: true,
    format: 'yyyy-MM-dd',                  // 这是组件展示的日期格式
    valueFormat: 'yyyy-MM-dd',
    prop: 'tradeDate',
    slot: true
  }, {
    type: 'input',
    type: 'select',
    search: true,
    width: 180,
    label: '运营商',
    props: {
      label: 'operatorsName',
      value: 'operators'
    },
    dicUrl: '/rca/swckmanmadeclearaccountotherservicereport/listoperators',
    prop: 'operators',
    formatter: (row, value, label, column) => {
      if(value=='合计'){
        return '合计'
      }else{
        return value
      }
    },
  }, {
    type: 'select',
    label: '线路',
    prop: 'lineCode',
    width: 180,
    search: false,
    display: true,
    props: {
      label: 'name',
      value: 'code'
    },
    dicUrl: '/support/swparamline/dictsecondname',
    formatter: (row, value, label, column) => {
      if(value=='小计'){
        return '小计'
      }else{
        return value
      }
    },
  },
  {
    label: '未进ACC系统的交易',
    children: [
      {
        label: "误出站应急纸票",
        children: [
          {
            label: '误出站应急纸票',
            children: [
              {
                type: 'input',
                width:'150px',
                label: '回收金额',
                prop: 'emeRecycle',
                showSummary: true,
                precision: 7,
                formatter: (row, value, label, column) => {
                  return rcaNumberFormat0(value)
                },
              }, {
                type: 'input',
                width:'150px',
                label: '发售金额',
                prop: 'emeSale',
                showSummary: true,
                precision: 7,
                formatter: (row, value, label, column) => {
                  return rcaNumberFormat0(value)
                },
              }, {
                type: 'input',
                width:'150px',
                label: '清分划账金额',
                prop: 'emeClear',
                showSummary: true,
                precision: 7,
                formatter: (row, value, label, column) => {
                  return rcaNumberFormat0(value)
                },
              }
            ]
          }
        ]
      },          
      {
        label: '14号线机场段发售大客流应急纸票',
        children: [
          {
            type: 'input',
            width:'150px',
            label: '发售金额',
            prop: 'streamAirSale',
            showSummary: true,
            precision: 7,
            formatter: (row, value, label, column) => {
              return rcaNumberFormat0(value)
            },
          }, {
            type: 'input',
            width:'150px',
            label: '回收金额',
            prop: 'streamAirRecycle',
            showSummary: true,
            precision: 7,
            formatter: (row, value, label, column) => {
              return rcaNumberFormat0(value)
            },
          }, {
            type: 'input',
            width:'150px',
            label: '清分划账金额',
            prop: 'streamAirClear',
            showSummary: true,
            precision: 7,
            formatter: (row, value, label, column) => {
              return rcaNumberFormat0(value)
            },
          }
        ]
      },
      {
        label: '人工退款',
        children: [
          {
            type: 'input',
            width:'300px',
            label: '退款北客站（北广场）购买车票金额',
            prop: 'failNormalAirStationSale',
            showSummary: true,
            precision: 7,
            formatter: (row, value, label, column) => {
              return rcaNumberFormat0(value)
            },
          }, {
            type: 'input',
            width:'150px',
            label: '清分划账金额',
            prop: 'failNormalAirStationClear',
            showSummary: true,
            precision: 7,
            formatter: (row, value, label, column) => {
              return rcaNumberFormat0(value)
            },
          }, {
            type: 'input',
            width:'180px',
            label: '退其他车站购买车票金额',
            prop: 'failNormalAirOtherstationSale',
            showSummary: true,
            precision: 7,
            formatter: (row, value, label, column) => {
              return rcaNumberFormat0(value)
            },
          }, {
            type: 'input',
            width:'150px',
            label: '清分划账金额',
            prop: 'failNormalAirOtherstationClear',
            showSummary: true,
            precision: 7,
            formatter: (row, value, label, column) => {
              return rcaNumberFormat0(value)
            },
          }
        ]
      },
       {
        label: '西安地铁内部故障导致特殊退款',
        children: [
          {
            type: 'input',
            width:'150px',
            label: '退14号线机场段金额',
            prop: 'failSpeXadterrorSale',
            showSummary: true,
            precision: 7,
            formatter: (row, value, label, column) => {
              return rcaNumberFormat0(value)
            },
          }, {
            type: 'input',
            width:'150px',
            label: '清分划账金额',
            prop: 'failSpeXadterrorClear',
            showSummary: true,
            precision: 7,
            formatter: (row, value, label, column) => {
              return rcaNumberFormat0(value)
            },
          }
        ]
      },
	  {
        label: '14号线机场段故障导致特殊退款',
        children: [
          {
            type: 'input',
            width:'150px',
            label: '退款金额',
            prop: 'failSpeAirerrorSale',
            showSummary: true,
            precision: 7,
            formatter: (row, value, label, column) => {
              return rcaNumberFormat0(value)
            },
          }, {
            type: 'input',
            width:'150px',
            label: '清分划账金额',
            prop: 'failSpeAirerrorClear',
            showSummary: true,
            precision: 7,
            formatter: (row, value, label, column) => {
              return rcaNumberFormat0(value)
            },
          }
        ]
      },
      {
        label: '合计',
        children: [
          {
            type: 'input',
            width:'150px',
            label: '清分划账金额',
            prop: 'streamAirTotalClear',
            showSummary: true,
            precision: 7,
            formatter: (row, value, label, column) => {
              return rcaNumberFormat0(value)
            },
          }
        ]
      }
    ]
  },
  ]
}
